1. Field of the Invention
The present invention relates generally to a data processing apparatus which forms a part of a controller of an output device such as a laser printer, for processing outline data representative of character outlines, and more particularly to such a data processing apparatus which is capable of processing or providing two or more groups of outline data representative of respective different outlines having different stroke widths for each character.
2. Discussion of the Prior Art
A character such as a letter or symbol to be displayed or printed is represented by a group of outline data representative of the outline of the character. The character consists of at least one stroke, and the outline of the character consists of a plurality of segments such as straight lines and curved lines, which are connected to each other so as to form a closed loop or loops. Each group of outline data includes coordinate data sets representative of coordinate values of the points which define each segment of the outline, and attribute flags each indicative of the type of teach segment of the outline, e.g., straight or curved line. The same character may have different outlines, for example, a regular outline having a regular stroke width, and a boldface outline whose stroke width is larger than the regular stroke width. In this case, two outline data groups each consisting of the coordinate data sets and the attribute flags are required for the two different outlines. FIG. 10 shows a group of outline data sets for the regular outline of the character "D", and another group of outline data sets for boldface outline of the same character. In each group of outline data sets, each attribute flag (S, B, L) indicative of a straight or curved line is followed by one or more pairs of x-axis and y-axis coordinate values. As indicated in FIGS. 3A and 3B, the outline of the character "D" consists of an outer closed loop and an inner closed loop, which define the stroke width of the character to be displayed, printed or otherwise outputted. For each of the regular and boldface outlines, the inner loop is represented by the upper row of data while the outer loop is represented by the lower row of data, as seen in FIG. 10.
Thus, coordinate data sets representative of straight and/or curved segments of each closed loop and attribute flags indicative of the type of each segment are required for each of different outlines of each character which have different stroke widths. Usually, a batch of outline data for a large number of characters is stored in a read-only memory.
When a character is printed, for instance, the corresponding outline data is first processed as indicated in the flow chart of FIG. 11, by way of example. Initially, a character code representative of the character to be printed is read in step S11. Step s11 is followed by step S12 in which a data pointer is set at the first outline data set, namely, the first attribute flag (start point flag) for the character designated by the character code. Then, step S13 is executed to read the first attribute flag, store it in a random-access memory, and then advance the data pointer one step.
The control flow then goes to step S14 to determine whether or not the attribute flag currently stored in the random-access memory is a loop end flag "*" indicative of the end of a closed loop of the character outline, namely, the end of the outline data for that closed loop. If the attribute flag is the loop end flag "*", the control flow returns to step S13 to read the first attribute flag for the next closed loop of the character outline. If the attribute flag is not the loop end flag "*", step S14 is followed by step S15 to determine whether or not the current attribute flag is an outline end flag "!" indicative of the end of the character outline, namely, the end of the outline data for the character. If an affirmative decision (YES) is obtained in step S15, the routine of FIG. 8 is terminated. If a negative decision (NO) is obtained in step S15, that is, if the attribute flag read in step S13 is neither the loop end flag "*" nor the outline end flag "!", then the control flow goes to step S16. In step S16, coordinate data following the current attribute flag is read and processed for required converting operations, which include, for example, the conversion of the coordinate data of curved lines into short-vector data, and the conversion of the coordinate data depending upon the selected size and attitude of the character. Then, the data pointer is advanced to read the next attribute flag in step S13 which follows step S16. The data obtained in step S16 is stored in the random-access memory. Steps S13-S16 are repeatedly executed until the affirmative decision (YES) is obtained in step S15, namely, until the outline end flag "!" is read in step S13. The data obtained in step S16 and stored in the random-access memory is subsequently converted into dot data representative of image dots which collectively define the outline of the character. The dot data is supplied to a printing device so that the relevant character is printed according to the dot data.
In the known data processing apparatus, however, the attribute flags are required for each of two or more groups of coordinate data sets for respective different outlines of the same character. Further, a group of coordinate data sets is required for each of different outlines which define respective different stroke widths for each character. Accordingly, the outline data memory in the form of a read-only memory should have a considerably large data storage capacity. The required storage capacity is particularly large, when the characters available include Chinese characters, whose outlines generally consist of many segments including those for serifs at the ends of strokes of the characters. The number of coordinate values representative of the outline segments and the number of the corresponding attribute flags increase with the number of the outline segments.